/******************************************************************************* 
 * Copyright (c) 2008 xored software, Inc.  
 * 
 * All rights reserved. This program and the accompanying materials 
 * are made available under the terms of the Eclipse Public License v1.0 
 * which accompanies this distribution, and is available at 
 * http://www.eclipse.org/legal/epl-v10.html  
 * 
 * Contributors: 
 *     xored software, Inc. - initial API and Implementation (Yuri Strot) 
 *******************************************************************************/
package com.xored.glance.internal.items;

import com.xored.glance.core.IMatch;
import com.xored.glance.core.ITextBlock;

/**
 * @author Yuri Strot
 * 
 */
public class ItemMatch implements IMatch {

	private int offset;
	private int length;

	private ItemCell cell;

	public ItemMatch(ItemCell cell, int offset, int length) {
		this.cell = cell;
		this.offset = offset;
		this.length = length;
	}

	/**
	 * @return the item
	 */
	public ItemCell getCell() {
		return cell;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.xored.glance.core.IMatch#getLength()
	 */
	public int getLength() {
		return length;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.xored.glance.core.IMatch#getOffset()
	 */
	public int getOffset() {
		return offset;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.xored.glance.core.IMatch#getTextBlock()
	 */
	public ITextBlock getTextBlock() {
		return cell;
	}

}
